package base.template;

/**
 * @program: DesignPatterns
 * @description: 实现单个字符的打印
 * @author: Mr.Dai
 * @create: 2018-04-28 16:15
 **/
public class CharDisplay extends AbstractDisplay {

    private Character ch;

    public CharDisplay(char ch) {
        this.ch=ch;
    }

    @Override
    public void open() {
        System.out.print("<<<");
    }

    @Override
    public void print() {
        System.out.print(ch);
    }

    @Override
    public void close() {
        System.out.println(">>>");
    }

    @Override
    public void display() {
        super.display();
    }
}
